package com.turing.model.registry.inner;


import com.turing.model.registry.vo.XxlJobInfoVo;
import com.xxl.job.core.biz.model.ReturnT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient( name = "job-admin",path = "job-admin")
public interface XxlJobAdminInnerService {

    @PostMapping("/jobinfo/addJob")
    ReturnT<String> addJob(@RequestBody XxlJobInfoVo jobInfoVo);

    @PostMapping("/jobinfo/startJob")
    ReturnT<String> startJob(@RequestParam("id") Integer id);

    @PostMapping("/jobinfo/stopJob")
    ReturnT<String> stopJob(@RequestParam("id") Integer id);

    @PostMapping("/jobinfo/removeJob")
    ReturnT<String> removeJob(@RequestBody XxlJobInfoVo jobInfoVo);

    @RequestMapping("/jobgroup/getIdByAppName")
    ReturnT<Integer> getIdByAppName(@RequestParam("appName") String appName);

}
